<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>MyNode</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="node">
	<meta http-equiv="description" content="MyNode">
	<link rel="stylesheet" type="text/css" href="css/div.css">
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/index_jsp.js"></script>
  </head>
  
  <body>
    <center>
    	<h1>Welcome to MyNode!</h1>
    	<div>
    		<form action="UserLogin" method="POST">
    			Name:<input type="text" name="username" /><br/>
    			Pass:<input type="password" name="userpass" /><br/>
    			<a href="user_register.jsp">Sign in</a>
    			<input type="submit" value="Login" />
    		</form>
    	</div>
    	<div>
		<table>
		<tr><th colspan="2" align="center">Current Server</th></tr>
		<tr><td align="right">Session:</td><td align="left"><%=session.getId()%></td></tr> 
		<tr><td align="right">IP:</td><td align="left"><%=java.net.InetAddress.getLocalHost()%></td></tr>
		<tr><td align="right">TempDir:</td><td align="left"><%=System.getProperty("java.io.tmpdir")%></td></tr>
		</table>
	</div>
    </center>
  </body>
</html>
